﻿using System;
using System.Windows.Forms;

namespace KingTools
{
    public partial class frmParamValue : Form
    {
        private readonly ListViewItem lvi;

        public frmParamValue()
        {
            InitializeComponent();
        }

        public frmParamValue(ListViewItem lvi)
        {
            InitializeComponent();
            this.lvi = lvi;
        }

        private void frmParamValue_Load(object sender, EventArgs e)
        {
            cboType.Text = lvi.Text;
            txtValue.Text = lvi.SubItems[1].Text;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            lvi.Text = cboType.Text;
            lvi.SubItems[1].Text = txtValue.Text;
            Close();
        }
    }
}